<?php 
$zebra=0;
if ($data->num_rows() > 0):
	foreach($data->result_array() as $ch):
?>
	<tr <?php if ($zebra++%2==1):?> class="zebra" <?php endif?> 
		onmouseover="$(this).getElements('input[class:buttonSmall]').setStyle('visibility','visible')"
		onmouseout="$(this).getElements('input[class:buttonSmall]').setStyle('visibility','hidden')">
	<td><?php echo $ch['detachiev_id']?></td>
	<td><?php echo $ch['detachiev_nama']?></td>
	<td><?php echo $tingkat_options[$ch['detachiev_tingkat']]?></td>
	<td><?php echo $jenis_options[$ch['achiev_jenis']]?></td>
	<td><?php echo $ch['achiev_bidang']?></td>
	<td align="right">
		<input class="buttonSmall" type="button" style="font-size: 14px; visibility:hidden;" value="&#62;" 
			onclick="<?php echo $submit_action?>(<?php $z=0; foreach (explode(",",$return_fields) as $dd): 
				if ($dd=='achiev_jenis' && $translate): echo ($z>0?"," : "")."'".$jenis_options[$ch[$dd]]."'"; $z++;
				elseif ($dd=='detachiev_tingkat' && $translate): echo ($z>0?"," : "")."'".$tingkat_options[$ch[$dd]]."'"; $z++;
				else: echo ($z>0?"," : "")."'$ch[$dd]'"; $z++;
				endif;
			endforeach?>)" title="Choose" />
	</td>
	</tr>
<?php 
	endforeach;
else:
?><tr><td align="center" colspan="6">Tidak ada data</td></tr><?php 
endif;